﻿using AexoManager.Datos;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;

namespace AexoManager.BussinesLogic
{
    public class SingletonContext
    {
        public static AexoDataAccess Default
        {
            get
            {
                AexoDataAccess defaultInstance = (AexoDataAccess)HttpContext.Current.Items["datacontext"];
                
                if (defaultInstance == null)
                {
                    defaultInstance = new AexoDataAccess();
                    HttpContext.Current.Items.Add("datacontext", defaultInstance);
                }
                return defaultInstance;
            }
        }
    }

}
